package com.usdt.system.domain.resp;

import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.util.ArrayList;
import java.util.List;

import org.apache.commons.lang3.StringUtils;
import org.springframework.format.annotation.DateTimeFormat;

import com.alibaba.fastjson2.JSON;
import com.fasterxml.jackson.annotation.JsonFormat;

import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.ToString;

@Data
@ToString
@NoArgsConstructor
@AllArgsConstructor
@Tag(name = "活动VO")
public class ActivityRespVO {
	
	@Schema(title = "id")
    private Integer id;
	
	@Schema(title = "模板名称")
    private String name;
	
	@Schema(title = "模板维度")
	private Integer activityCategory;
	
	@Schema(title = "模板类别")
	private Integer activityType;
	
	@Schema(title = "活动时长")
	private BigDecimal activityDuration;
	
	@Schema(title = "活动时长单位")
	private Integer activityDurationUnit;
	
	@Schema(title = "准备时长")
	private BigDecimal activityPreparationDuration;
	
	@Schema(title = "准备时长单位")
	private Integer activityPreparationDurationUnit;
	
	@Schema(title = "活动时间")
	@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss")
	private LocalDateTime activityTime;
	
	@Schema(title = "活动地点库id")
	private Integer activityAddressTempId;
	
	@Schema(title = "活动地点")
	private String activityAddress;
	
	@Schema(title = "人数限制")
	private BigDecimal activityPeopleLimited;
	
	@Schema(title = "材料/资源")
	private String activityResourc;
	
	@Schema(title = "环境/场地")
	private String activityVenue;
	
	@Schema(title = "撰写人")
	private String activityWriter;
	
	@Schema(title = "流程说明")
	private List<String> activityProcessDescription;
	
	private String activityProcessDescriptionJson;
	
	@Schema(title = "注意事项")
	private String  activtyNotes;
	
	@Schema(title = "适合人群")
	private String  activtyCrowd;
	
	@Schema(title = "禁忌")
	private String  activtyTaboo;
	
	@Schema(title = "取消原因")
	private String  cancelReason;
	
	@Schema(title = "积分")
	private Byte activtyPoints;
	
	@Schema(title = "状态")
	private Byte status;
	
	@Schema(title = "活动状态")
	private Byte activityStatus;
	
	@Schema(title = "活动实际时长")
	private BigDecimal activityRealDuration;
	
	@Schema(title = "活动实际时长单位")
	private Integer activityRealDurationUnit;
	
	@Schema(title = "实际人数")
	private BigDecimal activityRealPeople;
	
	@Schema(title = "备注")
	private String remark;
	
	@Schema(title = "活动人员")
	private List<ActivityCustomerRespVO> activityCustomerList; 
	
	@Schema(title = "活动图片")
	private List<String> imgList; 
	
	@Schema(title = "活动视频")
	private List<String> videoList; 

    public List<String> getActivityProcessDescription(){
    	if (StringUtils.isNotBlank(activityProcessDescriptionJson)) {
			 return JSON.parseArray(activityProcessDescriptionJson, String.class);
		}
        return new ArrayList<String>();
    }

}
